package cn.gs.exchanger;

// @author gs

import java.util.concurrent.atomic.AtomicInteger;

public class Pro2 implements IPro2 {

    static AtomicInteger cc = new AtomicInteger();

    public Struct cons(String name, int value, Enum1 e) {
        System.out.println("cons: " + value + "  /" + cc.incrementAndGet());
        if (name == null || e == null) {
            return null;
        }
        Struct s = new Struct();
        s.setName(name);
        s.setValue(value);
        s.setE(e);
        return s;
    }

    public float process(float[] args) {
        float q = 0;
        for (float u : args) {
            q += u;
        }
        return q;
    }
}